//
//  JGNavigationBar.m
//  Netease_Project
//
//  Created by JJetGu on 15-6-18.
//  Copyright (c) 2015年 JJetGu. All rights reserved.
//

#import "JGNavigationBar.h"

@implementation JGNavigationBar

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    for (UIButton *button in self.subviews) {
         if (![button isKindOfClass:[UIButton class]]) continue;
        
        if (button.centerX < self.width * 0.5) { // 左边的按钮
             button.x = 0;
        } else if (button.centerX > self.width * 0.5) { // 右边的按钮
            button.x = self.width - button.width;
        }
    }
}

@end
